package com.example.novelweb.utils.WordCheck;

import java.util.HashMap;

public class Node extends HashMap<Character, Node> {
  private NodeState state = NodeState.NON_LEAF;


  public NodeState getState() {
    return state;
  }

  public void setState(NodeState state) {
    this.state = state;
  }

  boolean isNonLeaf() {
    return this.state == NodeState.NON_LEAF;
  }

  boolean isLikeLeaf() {
    return this.state == NodeState.LIKE_LEAF;
  }

  boolean isLeaf() {
    return this.state == NodeState.LEAF;
  }

}
